package com.dt.okhttp;

import io.reactivex.Observable;
import rx.Subscriber;

public class ObsSubUtils {
    public static void abv() {

        new Subscriber<String>() {
            @Override
            public void onNext(String s) { System.out.println(s); }
            @Override
            public void onCompleted() { }
            @Override
            public void onError(Throwable e) { }
        };

        Observable.just("Hello, world!")
                .map(s -> s.hashCode())
                .subscribe(i -> System.out.println(Integer.toString(i)));

        Observable.just("Hello, world!")
                .map(s -> s.hashCode())
                .map(i -> Integer.toString(i))
                .subscribe(s -> System.out.println(s));

    }

    public static void main(String[] args) {
        abv();
    }
}
